<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023-06-06
  Time: 11:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加信息</title>
    <style>
        table {
            margin: auto;
        }

        th, td {
            text-align: center;
        }
        form{
            height: 5px;
            display: inline-block;
        }
        a{
            text-decoration: none;
        }
    </style>
</head>
<body>
<table border="1px">
    <tr>
        <th>考勤编号</th>
        <th>学生姓名</th>
        <th>出勤时间</th>
        <th>出勤状况</th>
        <th>学生编号</th>
        <th colspan="3">操作</th>
    </tr>
    <c:forEach items="${list}" var="i">
        <tr>
            <td>${i.sid}</td>
            <td>${i.name}</td>
            <td>${i.time}</td>
            <c:if test="${i.type==1}">
                <td>已到</td>
            </c:if>
            <c:if test="${i.type==2}">
                <td>迟到</td>
            </c:if>
            <c:if test="${i.type==3}">
                <td>旷课</td>
            </c:if>
            <td>${i.sid}</td>
            <td><a href="/add"><button>添加</button></a></td>
            <td><a href="/delete/${i.sid}"><button>删除</button></a></td>
            <td><a href="/edit/${i.sid}"><button>编辑</button></a></td>
<%--            <td>--%>
<%--                <form action="/select" method="post">--%>
<%--                    <lable>添加</lable><input type="submit"  value="${i.aid}" name="add">--%>
<%--                </form>--%>
<%--                <form action="/select" method="post">--%>
<%--                    <lable>删除</lable><input type="submit" value="${i.aid}" name="delete">--%>
<%--                </form>--%>

<%--                <form action="/select" method="post">--%>
<%--                    <lable>编辑</lable><input type="submit" value="${i.aid}" name="edit">--%>
<%--                </form>--%>
<%--            </td>--%>
        </tr>
    </c:forEach>
</table>
</body>
</html>
